package com.ssy.lingxi.order.model.dto;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Objects;

/**
 * 更新会员商品、渠道商品售卖数量DTO
 * @author 万宁
 * @version 2.0.0
 * @date 2022-02-10
 */
public class OrderProductStockDTO implements Serializable {
    private static final long serialVersionUID = -2844169395612655118L;

    public OrderProductStockDTO() {
    }

    public OrderProductStockDTO(Long skuId, Long stockId, BigDecimal quantity) {
        this.skuId = Objects.isNull(skuId) ? 0L : skuId;
        this.stockId = Objects.isNull(stockId) ? 0L : stockId;
        this.quantity = quantity;
    }

    /**
     * 会员商品SkuId
     */
    private Long skuId;

    /**
     * 渠道商品Id
     */
    private Long stockId;

    /**
     * 售卖数量
     */
    private BigDecimal quantity;

    public Long getSkuId() {
        return skuId;
    }

    public void setSkuId(Long skuId) {
        this.skuId = skuId;
    }

    public Long getStockId() {
        return stockId;
    }

    public void setStockId(Long stockId) {
        this.stockId = stockId;
    }

    public BigDecimal getQuantity() {
        return quantity;
    }

    public void setQuantity(BigDecimal quantity) {
        this.quantity = quantity;
    }
}
